<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{:config("app.app_name")}</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link href="__STATIC__/layui/css/layui.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/css/layuimini.css?v=2.0.4.2" media="all">
    <link rel="stylesheet" href="__STATIC__/css/public.css?v=2.0.4.3" media="all">
    <link rel="stylesheet" href="__STATIC__/css/themes/default.css" media="all">
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>

    </style>
</head>
<body  >
<div class="layuimini-container">
    <div class="layuimini-main">
        <form class="layui-form layuimini-form" action="{:url('admin/AdminUser/updatePassword')}" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="password" name="old_password" value="" required lay-verify="required" placeholder="请输入原密码" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="password" name="password" value="" placeholder="请输入新密码" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">重复密码</label>
                <div class="layui-input-block">
                    <input type="password" name="confirm_password" value="" placeholder="请再次输入新密码" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="submit">更新</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="__JS__/jquery.min.js"></script>
<script src="__STATIC__/layui/layui.js"></script>
<script src="__STATIC__/layui/lay-config.js?v=2.0.0" charset="utf-8"></script>
<script src="__JS__/common.js"></script>
<script>
    layui.use(function () {
        var form = layui.form;
        var layer = layui.layer;
        // 提交事件
        form.on('submit(submit)', function(data){
            var field = data.field; // 获取表单字段值
            Ajax(data.form.action,data.form.method,$(data.form).serialize(),
                success=function (info) {
                    if (info.code === 1) {
                        layer.msg(info.msg,function(){
                            window.location.href = ""
                        });

                    }else{
                        layer.msg(info.msg)
                    }
                },error=function(e){
                    console.log(e,22)
                }
            );

            return false; // 阻止默认 form 跳转
        });
    });
</script>
</body>
</html>
